home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / FILEVIEW.DMO < prev    next >
Text File  |  1996-07-04  |  3KB  |  68 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   FILEVIEW.DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. '.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
  19. ' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
  20. $INCLUDE "DAS-NB01.INC"
  21. $INCLUDE "DAS-NBT1.INC"
  22. COLOR 7, 0, 0
  23. '┌─────────────────────────────────────────────────────────────────────────────────────────────
  24. '│ FileView ( Row?, Col?, Rows?, Cols?, FileName$ )
  25. '├─────────────────────────────────────────────────────────────────────────────────────────────
  26. '│ I like to give my users the opportunity to print reports to either a file or to the printer.
  27. '│ This gives them the chance to have a look at what is going to be printed and make changes if
  28. '│ need be. Also, in this day and age an ASCii file goes over the modem as data and/or fax too.
  29. '│ FileView is the down and dirty little routine I use to let them preview the file. It is easy
  30. '│ to use but you must prepare the screen BEFORE calling it as it does NOTHING but print what it
  31. '│ finds in whatever color is already there!
  32. '├─────────────────────────────────────────────────────────────────────────────────────────
  33. '│ <HOME>  top of file    < UP > 1 line up    <PgUp>  Rows? - 1 up
  34. '│ <LEFT>  1 column left                      <RIGHT> 1 column right
  35. '│ <S/TAB> 5 columns left                     <TAB>   5 columns right
  36. '│ <END>   end of file    <DOWN> 1 line down  <PgDn>  Rows? - 1 down
  37. '│
  38. '│ <CTRL><LEFT> column 1                      <CTRL><RIGHT> rightmost column
  39. '│                        <ESC>  bail out
  40. '└──────────────────────────────────────────────────────────────────────────────────────────────
  41.  
  42. Row?  = 3
  43. Col?  = 6
  44. Rows? = 21
  45. Cols? = 70
  46. FileName$ = "DMO\FILEVIEW.DMO"
  47.  
  48. CLS
  49. COLOR 15, 1
  50.  
  51. T$ = "{ ?" + FileName$ + " 1}"
  52. MakeTBox Row?-1, Col?-1, Rows?+2, Cols?+2, 1, 49, 0, 0, 7, T$
  53. TBoxCOLOR Row?, Col?, Rows?, Cols?, 48
  54. DisplayFile Row?, Col?, Rows?, Cols?, FileName$
  55.  
  56. COLOR 7, 0, 0
  57. CLS
  58.  
  59. ' ──────────────────────────────────────────────────────────────────────────
  60.  
  61. FUNCTION fGetKey% () LOCAL PUBLIC
  62.  
  63.   WHILE NOT INSTAT : WEND
  64.   FUNCTION = CVI( INKEY$ + CHR$(0) )
  65.  
  66. END FUNCTION
  67.  
  68.